﻿using J.Status.Application.Command.BookingCommand;
using J.StatusModel.Dto;
using J.StatusRepository.Interface;
using MediatR;
using Microsoft.EntityFrameworkCore.Infrastructure;
using StatusService;

namespace J.Status.Application.Handler.BookingHandler
{
    public class RetainSelectHandler:IRequestHandler<RetainSelectCommand,List<ReserveModel>>
    {
        private readonly IBookingService bookingService;
        public RetainSelectHandler(IBookingService bookingService)
        {
            this.bookingService = bookingService;
        }

        public async Task<List<ReserveModel>> Handle(RetainSelectCommand request, CancellationToken cancellationToken)
        {
            return await bookingService.RetainShowAll();
        }
    }
}
